package com.book.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 账号表
 * </p>
 *
 * @author auto
 * @since 2025-04-02 06:38:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("user")
@Schema(name = "User对象", description = "账号表")
public class User {

    @Schema(name = "用户表主键")
    @TableId(value = "user_id", type = IdType.ASSIGN_UUID)
    private String userId;

    @Schema(name = "用户名")
    @TableField("user_name")
    private String userName;

    @Schema(name = "密码")
    @TableField("password")
    private String password;

    @Schema(name = "手机号")
    @TableField("phone")
    private String phone;

    @Schema(name = "微信ID")
    @TableField("wechat_openid")
    private String wechatOpenid;

    @Schema(name = "积分")
    @TableField("points")
    private Long points;

    @Schema(name = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(name = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(name = "头像")
    @TableField("avatar_url")
    private String avatarUrl;

    @Schema(name = "昵称")
    @TableField("nick_name")
    private String nickName;

    @Schema(name = "城市")
    @TableField("city")
    private String city;

    @Schema(name = "省份")
    @TableField("province")
    private String province;

    @Schema(name = "国家")
    @TableField("country")
    private String country;

    @Schema(name = "性别")
    @TableField("gender")
    private int gender;

    @Schema(name = "学院ID")
    @TableField("campus_id")
    private String campusId;
}
